package cn.good.yan.mapper;

import cn.good.yan.entity.Account;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;

/**
 * 账户实体
 *
 * @author shengren.yan
 * @create 2024-02-22
 */
@Repository
public interface AccountMapper extends BaseMapper<Account> {

    // 账户 扣减金额
//    @Update("UPDATE t_account SET used = used + #{money} , residue = residue - #{money} WHERE user_id = #{userId}")
//    void decrease(@Param("userId") Long userId, @Param("money") BigDecimal money);

}
